package com.zxy.supplier_system.server.controller

import com.zxy.supplier_system.server.controller.GeneralGoodsCategoryController.GeneralGoodsCategoryNodeResponse
import com.zxy.supplier_system.server.service.BusinessGeneralGoodsCategoryService
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("/businessGeneralGoodsCategories")
class BusinessGeneralGoodsCategoryController(
     private val businessGeneralGoodsCategoryService: BusinessGeneralGoodsCategoryService
){

     @GetMapping("tree")
     fun findAllTreeNodes():List<GeneralGoodsCategoryNodeResponse>{
          return businessGeneralGoodsCategoryService.findAllTreeNodes()
     }

}